home *** CD-ROM | disk | FTP | other *** search
- /*
- Public domain termios tcdrain() for the MiNT library
- 10 October 1993 entropy@terminator.rs.itd.umich.edu
- */
-
- #include <errno.h>
- #include <types.h>
- #include <ioctl.h>
- #include <mintbind.h>
- #include <termios.h>
-
- extern int __mint;
-
- int
- tcdrain(fd)
- int fd;
- {
- long outq;
- long r;
-
- if (__mint < 0x10a)
- {
- errno = -EINVAL;
- return -1;
- }
- do
- {
- r = Fcntl((short) fd, &outq, TIOCOUTQ);
- if (r < 0) {
- errno = (int) -r;
- return -1;
- }
- } while (outq != 0);
- return 0;
- }
-
-